pp108 : Splitting Controls, App Palettes, and XForms

Splitting Controls, App Palettes, and XForms

This topic describes the procedure to split App Palettes and grouping controls into different areas.

You can divide App Palettes, grouping controls, and XForms into different areas to group controls according to functionality or intended usage. Grouping controls are controls that can hold other controls, such as Groupbox, Group, and TabPage controls.

It is possible to split an App Palette, a grouping control, or an XForm vertically or horizontally. Each split area behaves as a separate, invisible container. By default, each split area retains the layout defined for an App Palette, grouping control, or XForm. You can, however, specify layouts and position and align controls for individual areas.

The procedure to split an App Palette, a grouping control, or an XForm is similar. Consider the procedure to split a grouping control.

  1. Open the XForm in the XForms Designer.
  2. To split a grouping control, right-click it, select Split, and select the appropriate option from the sub-menu:
    • Select Vertical to split vertically.
    • Select Horizontal to split horizontally.
      The splitter bar appears, and the grouping control is split into areas. On choosing Vertical, the splitter bar is placed to the left of the control, by default. On choosing Horizontal, the splitter bar is placed towards the top of the control. You can drag the splitter bar to resize the areas.
      Also, on splitting a control, the controls within are redistributed across the spilt areas according to their respective positions and the control layout:
      • In case of a vertical layout, all controls are repositioned to the left area when split vertically, and to the top area when split horizontally.
      • In case of a horizontal or free layout, the existing controls are repositioned and distributed on both sides of the split XForm, depending on their position.
  3. Right-click the splitter bar, and select Properties to specify its properties. Alternately, double-click the splitter bar. The Splitter window opens.
  4. Make the appropriate modifications to set the splitter properties.
    • Type a unique identifier for the control in the ID field. This is a design-time property.
    • Select Fixed to fix the position of the splitter bar at run time. If not selected, you can alter the position of the splitter bar at run time.
    • Type the text to be displayed as a tooltip in the Tooltip field.
    • Select an option to position the splitter:
      • Select Left to position the splitter with respect to the left side of the parent control. It divides the XForm in the ratio 1:2, horizontally.
      • Select Right to position the splitter with respect to the right side of the parent control. It divides the XForm in the ratio 2:1, horizontally.
      • Select Top to position the splitter with respect to the top of the parent control. It divides the XForm in the ratio 1:2, vertically.
      • Select Bottom to position the splitter with respect to the bottom side of the parent control. It divides the XForm in the ratio 2:1, vertically.

        Note:
        The above-mentioned positioning options are also available in the context menu of the splitter. You can set or modify the position of the splitter using the context menu.

        The splitter properties are set and the splitter bar is positioned as specified.

        Note: The distance between the splitter bar and the side with respect to which it is positioned remains constant on resizing the App Palette or grouping control.

Depending on the option you select, the grouping control gets divided into areas.

Note:

  • Double-clicking the splitter bar at run time repositions the bar such that the bar overlaps the edge with respect to which it is positioned. This hides the controls positioned in the corresponding split area. To restore the collapsed split area, double-click the splitter bar.
  • To remove a splitter, right-click the splitter bar and select Delete Splitter.
  • Using the Split context menu option will split the XForm or control into areas which cannot be further split into regions.
  • Using the Split As Regions context menu option will divide the XForm into regions (containing App Palettes) that can be further split into regions or areas.